<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div class="container" style="width: 100%;height: 65px;background:#EEEEEE;">
    <div class="row clearfix lafheader">
        <div class="col-md-12 column">
            <div class="col-md-offset-1 col-md-10 column">
                <a href="laf/showIndex" target="_top"><img class="header-logo" src="image/logo.png"></a>
                <div id="topmenu">
                    <a href="https://www.stbu.edu.cn">学校官网</a>
                    <a id="laftop" href="">全校 <i class="glyphicon glyphicon-chevron-down small"></i></a>
                    <div id="sc-content" style="z-index: 999">
                        <ul>
                            <c:forEach var="item" items="${scopeList}">
                                <li><a href="notice/query2?scopeId=${item.scopeId}">${item.locName}</a></li>
                            </c:forEach>
                        </ul>
                    </div>
                    <a href="laf/showLost" target="_top">寻物</a>
                    <a href="laf/showFound" target="_top">招领</a>
                    <a href="laf/showSearch" target="_top">搜索 <img src="image/hot_tip.gif" alt=""></a>
                    <div class="input-group col-md-3 lafinput" style="float: left;">
                        <input type="text" name="title" id="title" class="form-control small" placeholder="请输入物品特征快速搜索">
                        <span class="input-group-addon">
                            <a id="title_a" href="notice/query2?title=" target="_top">
                                <i class="glyphicon glyphicon-search"></i>
                            </a>
                        </span>
                    </div>
                    <a href="laf/showPublish" target="_top">发布 +</a>
                    <c:if test="${logUser eq null}">
                        <a href="laf/showLogin" target="_top">登录</a>
                    </c:if>
                    <c:if test="${logUser != null}">
                        <img id="header-h" src="image/header.png" alt="" width="50px">
                        <span id="header-h2">
                            <a href="">个人信息</a>
                            <a href="user/loginOut">退出登录</a>
                        </span>
                    </c:if>
                </div>
            </div>
            <div class="col-md-1 column"></div>
        </div>
    </div>
</div>

<script>
    var scjudge=false;
    var hejudge=false;
    $(function () {
        $('#sc-content').hide();
        $('#laftop').mouseover(function () {
            scjudge=true;
            $('#sc-content').fadeIn('fact')
        });
        $('#laftop').mouseout(function () {
            scjudge=false;
            setTimeout("scOut()",1000)
        });
        $('#sc-content').mouseover(function () {
            scjudge=true;
        });
        $('#sc-content').mouseout(function () {
            scjudge=false;
            setTimeout("scOut()",1000)
        });

        $('#header-h').mouseover(function () {
            hejudge=true;
            $('#header-h2').fadeIn('fact');
        });
        $('#header-h').mouseout(function () {
            hejudge=false;
            setTimeout("heOut()",1000)
        })
        $('#header-h2').mouseover(function () {
            hejudge=true;
        });
        $('#header-h2').mouseout(function () {
            hejudge=false;
            setTimeout("heOut()",1000)
        });

        $('#title').blur(function () {
            var a_href=$('#title_a').attr('href');
            $('#title_a').prop('href',a_href+$('#title').val());
        })
    });
    function scOut(){
        if(scjudge===false){
            $('#sc-content').fadeOut('fact');
        }
    }
    function heOut(){
        if(hejudge===false){
            $('#header-h2').fadeOut('fact');
        }
    }
</script>



